<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    
<%@ page import="board1.UserDAO" %>
<%@ page import="board1.UserTO" %>

<%
	request.setCharacterEncoding("UTF-8");
	
	UserTO to = new UserTO();
	to.setPhone_number(request.getParameter("phone_number"));
	to.setChon_id(request.getParameter("chon_id"));
	to.setUser_name(request.getParameter("user_name"));

	
	if(request.getParameter("user_lv").equals(""))
		to.setUser_lv("9");
	else
		to.setUser_lv(request.getParameter("user_lv"));
	
	log("phone_number :" + request.getParameter("phone_number"));
	log("chon_id :" + request.getParameter("chon_id"));
	log("user_name :" + request.getParameter("user_name"));
	log("user_lv :" + request.getParameter("user_lv"));
	
	UserDAO dao = new UserDAO();
	
	if(dao.insertUser(to)) {
		out.println("SUCCESS");
	} else {
		out.println("FAIL");
	}
%>